Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] User lacks permission to update ChatMessage #584

Closed
DrMcCoy opened this issue Mar 8, 2024 · 1 comment
Closed

[BUG] User lacks permission to update ChatMessage #584

DrMcCoy opened this issue Mar 8, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@DrMcCoy
Copy link
Contributor

DrMcCoy commented Mar 8, 2024

Describe the bug
Whenever a chat message is produced, the other players (but not the GM) get shown an error message.

Possibly an interaction with the module ChatPortrait. Didn't happen before Simple Calendar 2.4.8.

User lacks permission to update ChatMessage [E05uWeGYTTzuIZS1] foundry.js:68326:78
    fetch foundry.js:68326
    notify foundry.js:68223
    error foundry.js:68260
    _handleError foundry.js:3468
    dispatch foundry.js:3450
    value socket.js:532
    value socket.js:459
    emit index.mjs:136
    value manager.js:207
Foundry VTT | Created ChatMessage with id [E05uWeGYTTzuIZS1]
Error: User lacks permission to update ChatMessage [E05uWeGYTTzuIZS1]
index.js:1:69208
    addGameTimeToMessage modules/foundryvtt-simple-calendar/index.js:1
TypeError: Error thrown in hooked function '' for hook 'preCreateChatMessage'. speakerInfo.author is undefined
[Detected 1 package: chat-portrait]
    userByAlias ChatPortrait.js:1125
    find commons.js:4167
    loadImagePathForChatMessage ChatPortrait.js:1124
    setupHooks main.js:131
    #call foundry.js:730
    call foundry.js:712
    #preCreateDocumentArray foundry.js:13542

"Source" is this:

class Ye {
          static addGameTimeToMessage(e) {
            const s = R.getActiveCalendar(),
            a = {
              id: s.id,
              timestamp: s.toSeconds()
            };
            e.setFlag(t, 'sc-timestamps', a).catch((e => {
              console.error(e)
            }))
          }

To Reproduce

  1. Log in as a user
  2. Have a second user roll or write a chat message
  3. First user sees the error message

Foundry Information

  • Foundry Version: 11.315
  • Game System: pf1e 9.6
  • Simple Calendar Version: 2.4.8

Browser (please complete the following information):

  • Browser: Firefox 123.0 (64-bit)

Additional context
This module is installed as well: https://github.com/p4535992/foundryvtt-chat-portrait

@DrMcCoy DrMcCoy added the bug Something isn't working label Mar 8, 2024
@DrMcCoy
Copy link
Contributor Author

DrMcCoy commented Mar 9, 2024

Okay, I can confirm that this issue is fixed for me in 2.4.9. Thanks! :)

@DrMcCoy DrMcCoy closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants